package com.arpa.ntocc.common.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 机构配置表
 * </p>
 *
 * @author liuyj
 * @since 2019-11-28
 */
@Data
@Accessors(chain = true)
@TableName("sys_party_group_config")
@ApiModel(value="PartyGroupConfig对象", description="机构配置表")
public class PartyGroupConfig {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "网点编码")
    @TableField("branch_code")
    private String branchCode;

    @ApiModelProperty(value = "可编辑类型：custom 客户，platform 中台")
    @TableField("edit_type")
    private String editType;

    @ApiModelProperty(value = "配置类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "配置的key")
    @TableField("config_key")
    private String configKey;

    @ApiModelProperty(value = "配置的value")
    @TableField("config_value")
    private String configValue;

    @ApiModelProperty(value = "配置描述")
    @TableField("config_desc")
    private String configDesc;

    /**
     * 主键
     */
    @ApiModelProperty(hidden = true)
    @JsonIgnore
    @TableId(value = "id",type = IdType.AUTO)
    private String id;

    @TableLogic
    @TableField(value = "is_deleted")
    private Integer deleted;

    /**
     * 创建人
     */
    @ApiModelProperty(hidden = true)
    @TableField(value = "created_by")
    private String createdBy;

    /**
     * 修改人
     */
    @ApiModelProperty(hidden = true)
    @TableField(value = "modified_by")
    private String modifiedBy;
    /**
     * 创建时间
     * 自动填充
     */
    @TableField(value = "gmt_created", fill = FieldFill.INSERT)
//    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreated;

    /**
     * 修改时间
     * 自动填充
     */
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
//    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtModified;

}
